package kr.hkit.powerjava.chapter08.submit;

class Box {

	 int width;
	 int length;
	 int height;
	
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public int getHeight() {
		return height;
	}
	public void setHeight(int height) {
		this.height = height;
	}
	
	
	int getVolume() {
		return width*length*height;
	}
	
	void print(){
		System.out.printf("%s %s %s \n","가로"+ width, "세로"+ length, "높이" +height);
	}
}

public class BoxTest {
	public static void main(String[] args) {
		Box box1 = new Box();
		Box box2 = new Box();
		box2=box1;
		
		box1.setHeight(100);
		box1.setLength(100);
		box1.setWidth(100);
		System.out.println(box1.getVolume());
		
		box2.setHeight(200);
		box2.setLength(200);
		box2.setWidth(200);
		
		box1.print();
		box2.print();

	}
}
